protocols = lmtp submission

{{ $enable_pop3 := eq (or ($.Env.ENABLE_POP3) "") "true" }}
{{ $enable_imap := eq (or ($.Env.ENABLE_IMAP) "") "true" }}

{{ if $enable_imap }}
service imap-login {
  inet_listener imap {
    #port = 143
  }

  inet_listener imaps {
    #port = 993
    #ssl = yes
  }
}

service imap {
}

protocols = $protocols imap
{{ end }}

{{ if $enable_pop3 }}
service pop3-login {
  inet_listener pop3 {
    #port = 110
  }

  inet_listener pop3s {
    #port = 995
    #ssl = yes
  }
}

service pop3 {
}

protocols = $protocols pop3
{{ end }}

service submission-login {
  inet_listener submission {
    #port = 587
  }
}

service submission {
  #process_limit = 1024
}

service lmtp {
  inet_listener lmtp {
    port = 2003
  }
}
